/*
 * @Author: xiangru.xiao xiangru.xiao@mthreads.com
 * @Date: 2023-05-06 14:28:13
 * @LastEditors: xiangru.xiao xiangru.xiao@mthreads.com
 * @LastEditTime: 2023-05-17 14:49:01
 * Copyright (c) 2023 by Moore Threads, All Rights Reserved. 
 */
#ifndef CU_DEVICE_INFO
#define CU_DEVICE_INFO

#ifdef _WIN32
    #define CUDA_CALL __cdecl
    #define CUDA_API __declspec(dllexport)
#else
    #define CUDA_CALL
    #define CUDA_API
#endif

#include "cucheck.h"
#include <iostream>

#define DECLARE_PRIVATE(Class) \
    protected:                      \
    class Class##Private* d_ptr = nullptr;          \
    inline Class##Private* d_func() { return d_ptr; }\
    friend class Class##Private;

class CUDADeviceInfo
{
public:
    CUDADeviceInfo(int deviceid);
    ~CUDADeviceInfo();
    int deviceID();
    const std::string  &deviceName() const;
    const std::string  &driverVersion() const;
    size_t globalMemorySize() const;
    std::string infoString();
    DECLARE_PRIVATE(CUDADeviceInfo);
};

#endif
